package com.canbot.u05.activity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.canbot.u05.R;

/**
 * 编辑中心
 */
public class EditorActivity extends BaseActivityNoTitle implements View.OnClickListener {

        @Override
        protected void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                setContentView(R.layout.activity_editor);
                findViewById(R.id.btn_back_editor).setOnClickListener(this);
                findViewById(R.id.icon_setting_edit).setOnClickListener(this);
//                findViewById(R.id.icon_cloud_edit).setOnClickListener(this);
                findViewById(R.id.icon_service_edit).setOnClickListener(this);
        }

        @Override
        public void onClick(View view) {
                switch (view.getId()) {
                        case R.id.btn_back_editor:
                                finish();
                                break;
                        case R.id.icon_setting_edit:
                                startotherActivity(EditorActivity.this, IndustryModActivity.class);
                                break;
//                        case R.id.icon_cloud_edit:
//                                break;
                        case R.id.icon_service_edit:
                                startotherActivity(EditorActivity.this, BasicServerActivity.class);
                                break;
                        default:
                                break;


                }

        }

        /**
         * 跳转到其他activity
         */
        protected void startotherActivity(Context context, Class<?> cls) {
                Intent intent = new Intent(context, cls);
                startActivity(intent);
        }
}
